<?php
include_once '!config.php';
use models\Form as Form;
$form = new Form();
switch($_GET['action']){
    case 'addFormPart'      :   $smarty->assign('item',$form->addFormPart($_POST['fieldId'], $_POST['itemId']));
                                $smarty->display('form/formPart.tpl');
                                break;
                            
    case 'removeFormPart'   :   $smarty->assign('item',$form->removeFormPart($_POST['fieldId']));
                                $smarty->display('form/inactivePart.tpl');
                                break;
                            
    case 'setFormSequence'  :   $form->setFormSequence($_POST['fieldId'], $_POST['sequence']);
                                break;
}
?>
